import java.util.ArrayList;
import java.util.List;
public class Sac
{
	private double volMax;
	private double vol;
	private List<Lettre> contenu;

	public Sac(double v)
	{
		vol = 0;
		volMax = v;
		contenu = new ArrayList<Lettre>();
	}

	public Sac ajouter(Lettre l) 
	{
		if (vol + l.getVolume() <=volMax)
		{
			contenu.add(l);
			vol += l.getVolume();
			System.out.println("ok");
		}
		else 
		{
			System.out.println("ERREUR");
		}
		return this;
	}
        
	
	
	public double getVolume()
	{
		return vol;
	}
	public double getVolMax()
	{
		return volMax;
	}


}



